/*
 * mycamera.h
 *
 *  Created on: Mar 11, 2013
 *      Author: RDU
 */

#ifndef MYCAMERA_H_
#define MYCAMERA_H_

#include "opencv2/opencv.hpp"
#include "../GUI/myframe.h"

using namespace cv;

class MyFrame;

class MyCamera
{
public:
	MyCamera();
	~MyCamera();

public:
	bool m_Cam1_isOpen;
	bool m_Cam2_isOpen;
	bool m_Cam3_isOpen;
	bool m_showCorners;
	MyFrame *m_pFrame;
	int m_numImageCam1;
	int m_numImageCam2;
	int m_numImageCam3;
	int m_numImagePair1;
	int m_numImagePair2;

private:
	VideoCapture m_Capture1;
	VideoCapture m_Capture2;
	VideoCapture m_Capture3;

	Mat m_CapturedImage1;
	Mat m_CapturedImage2;
	Mat m_CapturedImage3;

public:
	bool OpenCam1();
	bool OpenCam2();
	bool OpenCam3();

	void CloseCam1();
	void CloseCam2();
	void CloseCam3();

	void CamerasRun();

	bool CaptureCam1();
	bool CaptureCam2();
	bool CaptureCam3();
	bool CapturePair1();
	bool CapturePair2();

private:
	String GenSavePath(String identity, int num, bool isPair, String pairID);
};


#endif /* MYCAMERA_H_ */
